﻿Public Class ObjectExistenceToVisibilityConverter
    Implements IValueConverter

    Public Function Convert(ByVal _value As Object, ByVal _targetType As System.Type, ByVal _parameter As Object, ByVal _culture As System.Globalization.CultureInfo) As Object Implements System.Windows.Data.IValueConverter.Convert
        Dim _returnValue As Visibility = Visibility.Collapsed

        If _value IsNot Nothing Then
            _returnValue = Visibility.Visible
        Else
            _returnValue = Visibility.Collapsed
        End If

        Return _returnValue
    End Function

    Public Function ConvertBack(ByVal _value As Object, ByVal _targetType As System.Type, ByVal _parameter As Object, ByVal _culture As System.Globalization.CultureInfo) As Object Implements System.Windows.Data.IValueConverter.ConvertBack
        Return Nothing
    End Function

End Class
